<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>日常记录 | 筱毅</title><meta name="author" content="Xiao Yi"><meta name="copyright" content="Xiao Yi"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="记录关于 cdn.jsdelivr.net cdn超时处理办法cdn.jsdelivr.net 域名替换为  fastly.jsdelivr.net   或者gcore.jsdelivr.net 每天学一点1234567myname &#x3D; &quot;global&quot;; &#x2F;&#x2F; 全局变量function func() &amp;#123;    alert(myname); &#x2F;&#x2F; &quot;unde">
<meta property="og:type" content="article">
<meta property="og:title" content="日常记录">
<meta property="og:url" content="https://gxiaoyi.gitee.io/2023/06/25/record/index.html">
<meta property="og:site_name" content="筱毅">
<meta property="og:description" content="记录关于 cdn.jsdelivr.net cdn超时处理办法cdn.jsdelivr.net 域名替换为  fastly.jsdelivr.net   或者gcore.jsdelivr.net 每天学一点1234567myname &#x3D; &quot;global&quot;; &#x2F;&#x2F; 全局变量function func() &amp;#123;    alert(myname); &#x2F;&#x2F; &quot;unde">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://s1.ax1x.com/2023/06/27/pCaMOit.jpg">
<meta property="article:published_time" content="2023-06-25T08:30:25.083Z">
<meta property="article:modified_time" content="2023-06-29T03:33:57.588Z">
<meta property="article:author" content="Xiao Yi">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://s1.ax1x.com/2023/06/27/pCaMOit.jpg"><link rel="shortcut icon" href="/../../img/favicon.png"><link rel="canonical" href="https://gxiaoyi.gitee.io/2023/06/25/record/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":false,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://gcore.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://gcore.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '日常记录',
  isPost: true,
  isHome: false,
  isHighlightShrink: true,
  isToc: true,
  postUpdate: '2023-06-29 11:33:57'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="/css/custom.css"><link rel="stylesheet" href="/css/universe.css"><link rel="stylesheet" href="/css/rightMenu.css"><!-- hexo injector head_end start --><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/assets/font-awesome-animation.min.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/tag_plugins.css" media="defer" onload="this.media='all'"><script src="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/assets/carousel-touch.js"></script><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.3.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>(()=>{
  const $loadingBox = document.getElementById('loading-box')
  const $body = document.body
  const preloader = {
    endLoading: () => {
      $body.style.overflow = ''
      $loadingBox.classList.add('loaded')
    },
    initLoading: () => {
      $body.style.overflow = 'hidden'
      $loadingBox.classList.remove('loaded')
    }
  }

  preloader.initLoading()
  window.addEventListener('load',() => { preloader.endLoading() })

  if (false) {
    document.addEventListener('pjax:send', () => { preloader.initLoading() })
    document.addEventListener('pjax:complete', () => { preloader.endLoading() })
  }
})()</script><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://s1.ax1x.com/2023/06/27/pCaMOit.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">2</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">1</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">1</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 随笔</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 娱乐</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/books/"><i class="fa-fw fas fa-book"></i><span> 书籍</span></a></li><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 社交</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/link/"><i class="fa-fw fas fa-link"></i><span> 朋友圈</span></a></li><li><a class="site-page child" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></li></ul></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="http://www.baidu.com"><span> 导航</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://s1.ax1x.com/2023/06/26/pCUipIH.jpg')"><nav id="nav"><span id="blog-info"><a href="/" title="筱毅"><span class="site-name">筱毅</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 随笔</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 娱乐</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/books/"><i class="fa-fw fas fa-book"></i><span> 书籍</span></a></li><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 社交</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/link/"><i class="fa-fw fas fa-link"></i><span> 朋友圈</span></a></li><li><a class="site-page child" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></li></ul></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="http://www.baidu.com"><span> 导航</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">日常记录</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-06-25T08:30:25.083Z" title="发表于 2023-06-25 16:30:25">2023-06-25</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-06-29T03:33:57.588Z" title="更新于 2023-06-29 11:33:57">2023-06-29</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="日常记录"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="记录"><a href="#记录" class="headerlink" title="记录"></a>记录</h1><h2 id="关于-cdn-jsdelivr-net-cdn超时处理办法"><a href="#关于-cdn-jsdelivr-net-cdn超时处理办法" class="headerlink" title="关于 cdn.jsdelivr.net cdn超时处理办法"></a>关于 cdn.jsdelivr.net cdn超时处理办法</h2><p>cdn.jsdelivr.net 域名替换为  fastly.jsdelivr.net   或者gcore.jsdelivr.net</p>
<h1 id="每天学一点"><a href="#每天学一点" class="headerlink" title="每天学一点"></a>每天学一点</h1><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">myname = <span class="string">&quot;global&quot;</span>; <span class="comment">// 全局变量</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">func</span>(<span class="params"></span>) &#123;</span><br><span class="line">    <span class="title function_">alert</span>(myname); <span class="comment">// &quot;undefined&quot;</span></span><br><span class="line">    <span class="keyword">var</span> myname = <span class="string">&quot;local&quot;</span>;</span><br><span class="line">    <span class="title function_">alert</span>(myname); <span class="comment">// &quot;local&quot;</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="title function_">func</span>();</span><br></pre></td></tr></table></figure>
<p>在这个例子中，你可能会以为第一个alert弹出的是”global”，第二个弹出”loacl”。这种期许是可以理解的，因为在第一个alert 的时候，myname未声明，此时函数肯定很自然而然地看全局变量myname，但是，实际上并不是这么工作的。第一个alert会弹 出”undefined”是因为myname被当做了函数的局部变量（尽管是之后声明的），所有的变量声明当被悬置到函数的顶部了。因此，为了避免这种混 乱，最好是预先声明你想使用的全部变量。</p>
<p>上面的代码片段执行的行为可能就像下面这样：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">myname = <span class="string">&quot;global&quot;</span>; <span class="comment">// global variable</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">func</span>(<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> myname; <span class="comment">// 等同于 -&gt; var myname = undefined;</span></span><br><span class="line">    <span class="title function_">alert</span>(myname); <span class="comment">// &quot;undefined&quot;</span></span><br><span class="line">    myname = <span class="string">&quot;local&quot;</span>;</span><br><span class="line">    <span class="title function_">alert</span>(myname); <span class="comment">// &quot;local&quot;&#125;</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="title function_">func</span>()</span><br></pre></td></tr></table></figure>
<h1 id="读-大叔手记（12）：我的一次面试经历（谈大叔如何应对面试官）"><a href="#读-大叔手记（12）：我的一次面试经历（谈大叔如何应对面试官）" class="headerlink" title="读 大叔手记（12）：我的一次面试经历（谈大叔如何应对面试官）"></a>读 大叔手记（12）：我的一次面试经历（谈大叔如何应对面试官）</h1><h2 id="关键词"><a href="#关键词" class="headerlink" title="关键词"></a>关键词</h2><span class='p red'>OO(面向对象编程)</span>、<span class='p yellow'>T氏法则</span>、<span class='p green'>如何评估工作</span>、<span class='p cyan'>在你看来，技术主管的角色和职责是什么</span>、<span class='p blue'>每日审查</span>、<span class='p gray'>灰色</span>
<h2 id="如何评估工作"><a href="#如何评估工作" class="headerlink" title="如何评估工作"></a>如何评估工作</h2><ol>
<li>项目大小以及项目难易程度</li>
<li>客户或公司的特殊限制约束</li>
<li>每个Level的工程师数量以及Skill的能力</li>
<li>开发步骤，每个步骤大概需要多少天（调研、分析、原型设计、架构、详细设计、编码、测试、bug修改、维护）</li>
<li>交付物的数量（即客户需要什么样的交付物，因为不同的公司可能需要不同的交付物文档）</li>
<li>会议、沟通、培训、Travel的时间</li>
<li>有无任何可以重用的组件或者解决方案</li>
<li>项目风险（CR，离职，换人等）以及Buffer</li>
</ol>
<h1 id="在你看来，技术主管的角色和职责是什么"><a href="#在你看来，技术主管的角色和职责是什么" class="headerlink" title="在你看来，技术主管的角色和职责是什么?"></a>在你看来，技术主管的角色和职责是什么?</h1><p>主要职责是项目和技术分析，方案决策，任务分配，进度，范围，质量，技术和沟通等，有时候，TL就是一个manager，因为他需要跟踪和控制项目的进度，找出项目风险然后避免这些风险，有时候又是一个BA，因为他需要有一个好的知识去完全理解客户的需求，所以说TL也是架构师和开发人员之间一座非常重要的桥梁，另外，TL也应该是一个技术决策者，在合适的时机做合理的决策，同时TL也在平时也应该负责整个Team的培训工作。</p>
<h2 id="每日审查"><a href="#每日审查" class="headerlink" title="每日审查"></a>每日审查</h2><p>你今天做了啥？/你正在做啥？/有没有任何问题需要别人的帮助？/明天的计划是什么？</p>
<h2 id="T氏法则"><a href="#T氏法则" class="headerlink" title="T氏法则"></a>T氏法则</h2><p>Input Validation 输入验证</p>
<p>Is input data validated to ensure that it contains only valid characters?<br>输入数据中是否只包含合法的字符？<br>Is input data validated to ensure that it is within appropriate ranges?<br>输入的数据是否在正确的范围之内？<br>Is validation performed by comparing with “known-good” (as opposed to “known-bad”) characters or sequences?<br>是否做过这样的验证，通过和已知正确的字符集或者序列比较来验证数据，而不是和已知错误的来比较？<br>Output Encoding 输出编码</p>
<p>Is data encoded using HTMLEncode (or similar function) when forwarding to display in the browser?<br>当需要输出到浏览器显示的时候，使用的是否是HTML编码（或者类似的功能）？<br>Is data provided as parameters to a parameterized SQL query (as opposed to concatenation into the query)?<br>作为参数的时候是否使用的是参数化的SQL查询（而不是连接到的查询）？ Oh，dear god! I really know nothing about this item.<br>Are steps taken to avoid SQL injection, Cross Site Scripting or other injection attacks (where appropriate)?<br>是否采用了如下措施去避免SQL注入，跨站脚本攻击和其他注入攻击（在适当的情况下）？<br>When supplying code and data as output, is it unambiguously clear where code and data are separated?<br>当提供的代码和数据作为输出的时候，是否真正做到了代码和数据的分离？<br>Information Exposure 信息披露</p>
<p>Do error messages distinguish correctly between information sent to internal and external users?<br>是否能够区分错误信息和正确的信息，并发送给内部人员和外部人员？（这句没读出来什么意思，按照我的理解来翻的。是否是说关于bug的级别信息，然后应该发送给不同的人员？Maybe，Tom knows。）<br>Are comments and private information removed from transmissions to the user?<br>在交给用户之前是否已经删掉了评论和私人信息？<br>Are internal IP addresses masked from external users?<br>内部IP是否屏蔽了外部用户的访问？<br>Are debug pages, and unused pages removed from the deployed web site?<br>开发网站上是否删除了调试页面和无用的页面？<br>Is debug and tracing code disabled, with no ability for unauthorized parties to use it or enable it?<br>调试和跟踪功能是否已经关闭，并且不会在未授权的情况下被打开或者使用？<br>Client-Side Security 客户端安全</p>
<p>Are security measures such as input validation implemented on the server-side?<br>像输入验证这样的安全措施是否是在服务器端实现的？<br>Are all security measures implemented on the client-side backed by equivalent or greater measures on the server-side?<br>所有在客户端验的安全施放，在服务器端是否有同等或者更多的措施来作为支撑？<br>Has the application (or changed components) been tested with custom clients that ignore client side restrictions?<br>应用程序（或者组件）在被客户端测试的时候，是否使用了一些客户端做不到的方法？<br>Poor Use of Cryptography 很少使用加密？</p>
<p>Have cryptography choices (key sizes, algorithms, etc.) been reviewed and approved by Policymakers?<br>加密（key的长度，算法等）的选择是否被决策人员审阅和确认过？<br>Are cryptographic elements configurable to change key sizes, choice of algorithms, etc.?<br>加密中的一些因素，例如Key的长度，算法是否是可配置的？<br>Is the cryptography implementation a widely-available library (as opposed to a custom solution, or developed in-house)?<br>加密的实现是否是一个广泛使用的库（而不是一个客户的解决方案或者闭门自制的）？<br>Is provision made for regular key rotation? Emergency key changes?<br>是否提供定期更换Key的功能？紧急情况下Key的修改？（还是别的什么意思？）<br>Thinking Only About Features 只关注功能本身</p>
<p>Has the application been tested by trying to feed it invalid input?<br>是否使用过非法的输入去测试应用程序？<br>Have there been any tests attempting to use SQL Injection, Cross-Site Scripting, etc.?<br>是否使用过SQL注入，跨站脚本攻击等办法去测试？<br>Has the application been written to reject incorrect or malicious data?<br>应用程序是否考虑到了恶意拒绝和恶意数据？<br>Does the application alert its operators about potential malicious behavior on the part of its users?<br>如果使用者在过去一段时间内的操作有潜在的破坏行为，应用程序是否会提醒使用者？<br>Does the application alert its operators about (mis-)configurations that reduce its security level?<br>如果某个操作会降低程序的安全性，应用程序是否会提醒使用者？<br>Has the application been reviewed to ensure that unauthenticated and unauthorized users are not given more access than is appropriate?未授权用或者未被认证的用户不会获得更多<br>Race Condition</p>
<p>Is the code flexible enough to cope with resource requests completing earlier / later than anticipated?<br>Are checks on authorization guaranteed to occur before access is granted or resources are fetched?<br>Is the application able to handle rapidly repeated requests and distinguish correctly between them?<br>Does the application ensure that connection state is kept out of global / shared variables or memory space?<br>Are locks, mutexes, semaphores, etc. correctly used to ensure that shared resources are not shared across execution or security contexts?<br>Has the review team considered changes that will occur if the compiler / optimizer change the order of execution of statements (within its limits)?<br>Failing Open, Ignoring Failure 打开失败，忽略失败</p>
<p>Are all return values checked?<br>是否所有返回值都被处理了？<br>Where exceptions are expected, are they all caught?<br>所有的异常都能被捕获到吗？<br>Is checking of correct input done by “deny by default” (e.g. a “white-list” of correct characters / sequences)?<br>是否检查了‘潜规则’认为正确的输入（例如白名单列表）？<br>Are functions communicating failures up through their call stack?<br>函数调用失败的时候，是否通过调用堆栈来查看错误原因？<br>Is the code written to assume that requests are invalid until they prove themselves to be valid?<br>代码中是否假设请求都是无效的，直到有正确的请求到达？<br>Failing to Recognize or Enforce Bounds 误差和边界检查</p>
<p>Are all arithmetic operations guaranteed to not overflow or underflow?<br>所有的算术运算操作都检查上溢出和下溢出了吗？<br>Are buffer overflows actively prevented, either by choice of development environment, language or code checks?<br>是否通过选择开发环境、开发语言、代码检查来主动防止缓冲区溢出？<br>Are classes and libraries used that prevent overflow or underflow (as opposed to classes that do not)?<br>类和库是否有上下溢出检查（而不是不检查）？<br>Are library functions prown to buffer overrun, removed and replaced with?<br>当库出现缓冲区溢出的时候，是替换掉还是删除？（怪怪的。Prown 做何解？）<br>Does the test plan execute edge cases on boundary checks?<br>测试计划是否包含边界检查？<br>Have you checked the entrance and exit criteria for all loops in the code to ensure that they are correct, and correctly handled?<br>确保所有循环的开始和停止条件都是正确的，并且被正确执行了？<br>Not Managing Resources from Creation to Destruction 从创建到销毁都没有资源管理？</p>
<p>Does each resource have a complete “story” that allows for a single creation and a single destruction, with managed ‘ownership’ in the middle?<br>在管理从属关系的时候，是否每个资源都有完整的生命周期，是否允许单独创建和单独销毁？（有点乱）<br>Does the test plan monitor resource usage to detect inappropriate growth in memory usage, open file handles, etc.?<br>是否有测试用例去检查不合理的内存增长，例如文件句柄的打开等？<br>Do object constructors initialize all member variables (if only to a null value)?<br>是否所有的成员都在构造函数被初始化了（只被赋值为空）？<br>Do object constructors avoid using operations that can cause failure?<br>是否在构造函数中使用一些可能失败的操作？<br>Are circular references correctly avoided?<br>是否存在交叉引用？<br>Hard-Coded Password/Assuming the Source Code Is Selected 硬编码的密码或者测试代码被选择？</p>
<p>Are all passwords, keys and other secret material removed from source code to configuration files?<br>密码、keys和其他安全相关的材料，所有这些都从代码中迁移到配置文件中了吗？<br>Has the executable code been scanned for the clear-text presence of strings that should not be there?<br>有可执行代码被当做不应该存在的纯粹的字符串吗？ （这么翻对吗？）<br>Does the code use a standard, EIS-approved, technique for storing keys in configuration files?<br>代码是否使用规范的技术（例如认证的EIS）， 把关键信息保存在配置文件中？<br>If the source code was given, as a whole, to an attacker, would they still be unable to attack the running program?<br>公开所有源代码，正在运行的程序是否依然无懈可击？<br>Unnecessary Complexity 没必要搞这个复杂</p>
<p>Is the code clear to read and understand, even without looking at the comments?<br>是否做到了‘代码就是最好的注释’？<br>第二种翻译：代码是否清晰易读，甚至不需要看注释？<br>Do the comments correctly describe the behavior of the source code?<br>注释和代码是否是一致的？<br>Do the comments completely describe the behavior of the source code?<br>注释是否涵盖了代码的全部功能？<br>Are any hidden / surprising / clever behaviors of the source code explained in comments?<br>一些隐藏的、预料之外的、技巧性的东西是否在注释中都有所提及？<br>Are the comments up to date?<br>注释是最新的吗？<br>Have all unexecuted portions of code been removed?<br>永远不可能被执行到的代码都被删除了吗？<br>Are function and variable names clear and meaningful?<br>函数和变量的名字是否清晰并有意义？<br>Static Code Analysis 静态代码分析</p>
<p>Has the code been analyzed with static code analysis tools that are configured to find security flaws?<br>代码是否采用静态代码分析工具去查找安全缺陷？<br>Have all new reports of possible security flaws been remediated correctly?<br>对于所有新发现的可能存在的安全问题，是否都采取了正确的安全补救措施？</p>
<u>文本内容</u>
<emp>文本内容</emp>
<wavy>文本内容</wavy>
<del>文本内容</del>
<kbd>文本内容</kbd>
<psw>文本内容</psw>
<ul>
<li>彩色文字<br>在一段话中方便插入各种颜色的标签，包括：<span class='p red'>红色</span>、<span class='p yellow'>黄色</span>、<span class='p green'>绿色</span>、<span class='p cyan'>青色</span>、<span class='p blue'>蓝色</span>、<span class='p gray'>灰色</span>。</li>
<li>超大号文字<br>文档「开始」页面中的标题部分就是超大号文字。<span class='p center logo large'>Volantis</span>
<span class='p center small'>A Wonderful Theme for Hexo</span>
</li>
</ul>
<ul>
<li>彩色文字<br>在一段话中方便插入各种颜色的标签，包括：<p class='p red'>红色</p>、<p class='p yellow'>黄色</p>、<p class='p green'>绿色</p>、<p class='p cyan'>青色</p>、<p class='p blue'>蓝色</p>、<p class='p gray'>灰色</p>。</li>
<li>超大号文字<br>文档「开始」页面中的标题部分就是超大号文字。<p class='p center logo large'>Volantis</p>
<p class='p center small'>A Wonderful Theme for Hexo</p>
</li>
</ul>
<div class="tip "><p>default</p>
</div>
<div class="tip info"><p>info</p>
</div>
<div class="tip success"><p>success</p>
</div>
<div class="tip error"><p>error</p>
</div>
<div class="tip warning"><p>warning</p>
</div>
<div class="tip bolt"><p>bolt</p>
</div>
<div class="tip ban"><p>ban</p>
</div>
<div class="tip home"><p>home</p>
</div>
<div class="tip sync"><p>sync</p>
</div>
<div class="tip cogs"><p>cogs</p>
</div>
<div class="tip key"><p>key</p>
</div>
<div class="tip bell"><p>bell</p>
</div>
<div class="tip fa-atom"><p>自定义font awesome图标</p>
</div>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://gxiaoyi.gitee.io">Xiao Yi</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://gxiaoyi.gitee.io/2023/06/25/record/">https://gxiaoyi.gitee.io/2023/06/25/record/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://gxiaoyi.gitee.io" target="_blank">筱毅</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="https://s1.ax1x.com/2023/06/27/pCaMOit.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://gcore.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-full"><a href="/2023/06/29/tom2/" title="深入理解JavaScript系列（20）：《你真懂JavaScript吗？》答案详解"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">深入理解JavaScript系列（20）：《你真懂JavaScript吗？》答案详解</div></div></a></div></nav><hr class="custom-hr"/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://s1.ax1x.com/2023/06/27/pCaMOit.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Xiao Yi</div><div class="author-info__description">筱毅个人站，主要涉及前端知识共享、实践教程、前沿技术共同学习等方面</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">2</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">1</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">1</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/xxxxx" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:xxxxxx@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%AE%B0%E5%BD%95"><span class="toc-number">1.</span> <span class="toc-text">记录</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%85%B3%E4%BA%8E-cdn-jsdelivr-net-cdn%E8%B6%85%E6%97%B6%E5%A4%84%E7%90%86%E5%8A%9E%E6%B3%95"><span class="toc-number">1.1.</span> <span class="toc-text">关于 cdn.jsdelivr.net cdn超时处理办法</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%AF%8F%E5%A4%A9%E5%AD%A6%E4%B8%80%E7%82%B9"><span class="toc-number">2.</span> <span class="toc-text">每天学一点</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%AF%BB-%E5%A4%A7%E5%8F%94%E6%89%8B%E8%AE%B0%EF%BC%8812%EF%BC%89%EF%BC%9A%E6%88%91%E7%9A%84%E4%B8%80%E6%AC%A1%E9%9D%A2%E8%AF%95%E7%BB%8F%E5%8E%86%EF%BC%88%E8%B0%88%E5%A4%A7%E5%8F%94%E5%A6%82%E4%BD%95%E5%BA%94%E5%AF%B9%E9%9D%A2%E8%AF%95%E5%AE%98%EF%BC%89"><span class="toc-number">3.</span> <span class="toc-text">读 大叔手记（12）：我的一次面试经历（谈大叔如何应对面试官）</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%85%B3%E9%94%AE%E8%AF%8D"><span class="toc-number">3.1.</span> <span class="toc-text">关键词</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%A6%82%E4%BD%95%E8%AF%84%E4%BC%B0%E5%B7%A5%E4%BD%9C"><span class="toc-number">3.2.</span> <span class="toc-text">如何评估工作</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%9C%A8%E4%BD%A0%E7%9C%8B%E6%9D%A5%EF%BC%8C%E6%8A%80%E6%9C%AF%E4%B8%BB%E7%AE%A1%E7%9A%84%E8%A7%92%E8%89%B2%E5%92%8C%E8%81%8C%E8%B4%A3%E6%98%AF%E4%BB%80%E4%B9%88"><span class="toc-number">4.</span> <span class="toc-text">在你看来，技术主管的角色和职责是什么?</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%AF%8F%E6%97%A5%E5%AE%A1%E6%9F%A5"><span class="toc-number">4.1.</span> <span class="toc-text">每日审查</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#T%E6%B0%8F%E6%B3%95%E5%88%99"><span class="toc-number">4.2.</span> <span class="toc-text">T氏法则</span></a></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/06/29/tom2/" title="深入理解JavaScript系列（20）：《你真懂JavaScript吗？》答案详解">深入理解JavaScript系列（20）：《你真懂JavaScript吗？》答案详解</a><time datetime="2023-06-29T08:04:34.749Z" title="发表于 2023-06-29 16:04:34">2023-06-29</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/06/25/record/" title="日常记录">日常记录</a><time datetime="2023-06-25T08:30:25.083Z" title="发表于 2023-06-25 16:30:25">2023-06-25</time></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('https://s1.ax1x.com/2023/06/26/pCUipIH.jpg')"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023  <i id="heartbeat" class="fa fas fa-heartbeat"></i> Xiao Yi</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><link rel="stylesheet" href="https://fastly.jsdelivr.net/gh/HCLonely/images@master/others/heartbeat.min.css"></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="chat-btn" type="button" title="聊天"><i class="fas fa-sms"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div id="rightMenu"><div class="rightMenu-group rightMenu-small"><div class="rightMenu-item" id="menu-backward"><i class="fa-solid fa-arrow-left"></i></div><div class="rightMenu-item" id="menu-forward"><i class="fa-solid fa-arrow-right"></i></div><div class="rightMenu-item" id="menu-refresh"><i class="fa-solid fa-arrow-rotate-right"></i></div><div class="rightMenu-item" id="menu-home"><i class="fa-solid fa-house"></i></div></div><div class="rightMenu-group rightMenu-line rightMenuOther"><a class="rightMenu-item menu-link" href="/archives/"><i class="fa-solid fa-archive"></i><span>文章归档</span></a><a class="rightMenu-item menu-link" href="/categories/"><i class="fa-solid fa-folder-open"></i><span>文章分类</span></a><a class="rightMenu-item menu-link" href="/tags/"><i class="fa-solid fa-tags"></i><span>文章标签</span></a></div><div class="rightMenu-group rightMenu-line rightMenuNormal"><a class="rightMenu-item menu-link" id="menu-radompage" href="/random/index.html"><i class="fa-solid fa-shoe-prints"></i><span>随便逛逛</span></a><div class="rightMenu-item" id="menu-translate"><i class="fa-solid fa-earth-asia"></i><span>繁简切换</span></div><div class="rightMenu-item" id="menu-darkmode"><i class="fa-solid fa-moon"></i><span>切换模式</span></div></div></div><div id="rightmenu-mask"></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://gcore.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><div class="js-pjax"><script>(()=>{
  const init = () => {
    twikoo.init(Object.assign({
      el: '#twikoo-wrap',
      envId: '',
      region: '',
      onCommentLoaded: function () {
        btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)'))
      }
    }, null))
  }

  const getCount = () => {
    const countELement = document.getElementById('twikoo-count')
    if(!countELement) return
    twikoo.getCommentsCount({
      envId: '',
      region: '',
      urls: [window.location.pathname],
      includeReply: false
    }).then(function (res) {
      countELement.textContent = res[0].count
    }).catch(function (err) {
      console.error(err);
    });
  }

  const runFn = () => {
    init()
    GLOBAL_CONFIG_SITE.isPost && getCount()
  }

  const loadTwikoo = () => {
    if (typeof twikoo === 'object') {
      setTimeout(runFn,0)
      return
    } 
    getScript('https://gcore.jsdelivr.net/npm/twikoo/dist/twikoo.all.min.js').then(runFn)
  }

  if ('Twikoo' === 'Twikoo' || !true) {
    if (true) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo)
    else loadTwikoo()
  } else {
    window.loadOtherComment = () => {
      loadTwikoo()
    }
  }
})()</script></div><canvas id="universe"></canvas><script defer src="/js/universe.js"></script><script defer src="https://npm.elemecdn.com/jquery@latest/dist/jquery.min.js"></script><script data-pjax defer src="/js/chocolate.js"></script><script data-pjax defer src="/js/rightMenu.js"></script><script id="canvas_nest" defer="defer" color="0,0,255" opacity="0.7" zIndex="-1" count="99" mobile="false" src="https://gcore.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-nest.min.js"></script><script id="click-heart" src="https://gcore.jsdelivr.net/npm/butterfly-extsrc/dist/click-heart.min.js" async="async" mobile="false"></script><script>(() => {
  window.$crisp = [];
  window.CRISP_WEBSITE_ID = "fc0d03da-9b32-45c2-a25b-2d0de04c3227";
  (function () {
    d = document;
    s = d.createElement("script");
    s.src = "https://client.crisp.chat/l.js";
    s.async = 1;
    d.getElementsByTagName("head")[0].appendChild(s);
  })();
  $crisp.push(["safe", true])

  const isChatBtn = true
  const isChatHideShow = true

  if (isChatBtn) {
    const open = () => {
      $crisp.push(["do", "chat:show"])
      $crisp.push(["do", "chat:open"])
    }

    const close = () => {
      $crisp.push(["do", "chat:hide"])
    }

    close()
    $crisp.push(["on", "chat:closed", function() {
      close()
    }])

    window.chatBtnFn = () => {
      $crisp.is("chat:visible") ? close() : open()
    }
  } else if (isChatHideShow) {
    window.chatBtn = {
      hide: () => {
        $crisp.push(["do", "chat:hide"])
      },
      show: () => {
        $crisp.push(["do", "chat:show"])
      }
    }
  }
})()</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div class="no-result" id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></div><!-- hexo injector body_end start --><script async src="https://at.alicdn.com/t/font_2032782_8d5kxvn09md.js"></script><!-- hexo injector body_end end --></body></html>